import request from "@/utils/request";

// 获取列表
export function getList(query) {
  return request({
    url: "/fxfzaqbz/data/getAllImportantActivity",
    method: "get",
    params: query,
  });
}

// 获取等级评估列表
export function getAssessList(query) {
  return request({
    url: "/fxfzaqbz/data/getAllSeismicHazardAssess",
    method: "get",
    params: query,
  });
}

export function getDataQuantification(id) {
  return request({
    url: "/fxfzaqbz/data/getByActiveId/"+ id,
    method: "get",
  });
}

export function getDataExport(id) {
  return request({
    url: "/fxfzaqbz/data/getAllReportById/"+ id,
    method: "get",
  });
}

//删除
export function delList(ids) {
  return request({
    url: "/fxfzaqbz/data/delImportantActivity/" + ids,
    method: "post",
  });
}

//新增
export function saveList(data) {
  return request({
    url: "/fxfzaqbz/data/saveImportantActivity",
    method: "post",
    data: data,
  });
}

export function saveReport(data) {
  return request({
    url: "/fxfzaqbz/data/saveReport",
    method: "post",
    data: data,
  });
}

export function reUpload(data) {
  return request({
    url: "/fxfzaqbz/data/reUpload",
    method: "post",
    data: data,
  });
}

//删除
export function delReport(id) {
  return request({
    url: "/fxfzaqbz/data/delReports/" + id,
    method: "post",
  });
}

//修改
export function updateList(query) {
  return request({
    url: "/fxfzaqbz/data/updateImportantActivity",
    method: "post",
    data: query,
  });
}

//搜索
export function serchList(query) {
  return request({
    url: "/fxfzaqbz/data/searchList",
    method: "get",
    params: query,
  });
}

export function getImport(id) {
  return request({
    url: "/fxfzaqbz/data/getImportantActivity/" + id,
    method: "get",
  });
}

export function getActivityIdList() {
  return request({
    url: "/fxfzaqbz/data/getNewImportantActivityId",
    method: "get",
  });
}


//校验重点目标
export function getName(ssJzwmc) {
  return request({
    url: "/fxfzaqbz/data/getSiteByName",
    method: "get",
    params:ssJzwmc
  });
}

//获取单位
export function getDw() {
  return request({
    url: "/fxfz/sOrg/getOrgTree",
    method: "get",
  });
}

// 获取reportId
export function getIdReport(query) {
  return request({
    url: "/fxfzaqbz/data/getCode",
    method: "post",
    data: query,
  });
}

// 获取是否覆盖
export function getReportByFC(query) {
  return request({
    url: "/fxfzaqbz/data/getReportByFC",
    method: "post",
    data: query,
  });
}

// 查看历史版本
export function getVersion(query) {
  return request({
    url: "/fxfzaqbz/data/getHistory",
    method: "post",
    data: query,
  });
}

//提交评核
export function submitAudit(data) {
  return request({
    url: "/fxfzaqbz/data/saveExpert",
    method: "post",
    data:data,
  });
}

//提交审核
export function submitSh(id) {
  return request({
    url: "/fxfzaqbz/data/submitSh/"+id,
    method: "post",
  });
}

// 查看意见id
export function getAttachIds(id) {
  return request({
    url: "/fxfzaqbz/data/getAttachIds/"+id,
    method: "get",
  });
}

// 上传评审意见
export function uploadYiJian(data) {
  return request({
    url: "/fxfzaqbz/data/uploadYiJian",
    method: "post",
    data:data
  });
}

// 结束活动
export function endActive(id) {
  return request({
    url: "/fxfzaqbz/data/updateActivityEndStatus/"+id,
    method: "post",
  });
}